import java.awt.Dimension;
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import engine.GameManager;
import game.MapTestState;

public final class Main {

	public static void main(String[] args) {
		Frame frame = new Frame();
		frame.setSize(new Dimension(800, 600));
		frame.setVisible(true);
		frame.addWindowListener(new WindowAdapter() {

			@Override
			public void windowClosing(WindowEvent e) {
				super.windowClosing(e);
				System.exit(0);
			}
		});

		GameManager mgr = GameManager.getInstance();
		mgr.setCanvas(frame);
		mgr.loadNextState(new MapTestState());
		mgr.startGame();

	}
}